<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/connopen.asp"-->
<!--#include file="lib/asp-common-lib.asp"-->
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CC的办公系统</title>
<!--#include file="lib/plugins.asp"-->
<style type="text/css">
	.ui-datepicker table {
		border: 0;
	}
</style>
<script type="text/javascript">
	$(function() {
	});
</script>
<!--#include file="lib/js-google-analytics.asp"-->
</head>

<body>
<!--#include file="lib/header.asp"-->
<!--#include file="lib/nav.asp"-->
<div id="main">
<!--#include file="lib/col1.asp"-->
<!--#include file="lib/col2.asp"-->
	<div id="col3" role="main">
		<div id="col3_content" class="clearfix">
<%
	if not CheckPostFlag(session("aaPostFlag"),2,15) then call JumpErrorPage(2)

	ok=true
	Set rs = Server.CreateObject("ADODB.Recordset")
	Set rs_chk = Server.CreateObject("ADODB.Recordset")
	sql = "SELECT tele_num, Sum(tele_weight) AS sum_weight FROM tele_all GROUP BY tele_num order by tele_num"
	rs.Open sql,conn,1,1
	do while not rs.eof
		if rs("sum_weight")<>1 then
			sum_weight=0
%>
<table class="full">
	<thead>
		<tr>
			<th>序号</th>
			<th>电话号码</th>
			<th>员工</th>
			<th>部门</th>
			<th>权重</th>
		</tr>
	</thead>
	<tbody>
<%
			ok=false
			sql_chk="select * from tele_all where tele_num='"&rs("tele_num")&"'"
			rs_chk.open sql_chk,conn,1,1
			do while not rs_chk.eof
				sum_weight=sum_weight+rs_chk("tele_weight")
%>
		<tr>
			<td><%=rs_chk.AbsolutePosition%></td>
			<td><%=rs_chk("tele_num")%></td>
			<td><%=rs_chk("empe_name")%></td>
			<td><%=rs_chk("dept_name")%></td>
			<td><%=formatpercent(rs_chk("tele_weight"),,-1)%></td>
		</tr>
	
<%				
				rs_chk.movenext
			loop
			rs_chk.close
			'response.write("电话号码："&rs("tele_num")&" 权重："&csng(rs("sum_weight"))&"<br />")
%>
	</tbody>
	<tfoot>
		<tr>
			<th>合计</th>
			<th></th>
			<th></th>
			<th></th>
			<th><%=formatpercent(sum_weight,,-1)%></th>
		</tr>
	</tfoot>
</table>

<%
			end if
		rs.movenext
	loop
	rs.close
	set rs=nothing
	set rs_chk=nothing
	if ok then response.write("全部检查完毕，权重正确<br />")
%>

		</div>
	</div>
</div>
<!--#include file="lib/footer.asp"-->
</body>
</html>
<!--#include file="lib/connclose.asp"-->

